<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>03_DOM操作2</title>
</head>
<body>

<input type="text" id="i1">
<input type="text" id="i2">
<button onclick="f1()">点我查看</button>
<hr>
<h4>显示结果：<span></span></h4>
<script>
    function f1() {
        let i1 = document.querySelector('#i1');
        let i2 = document.getElementById('i2');
        console.log(i1.value);
        console.log(i2.value);
        let spanE = document.querySelector('span')
        spanE.innerHTML = i1.value + i2.value;
    }
</script>


</body>
</html>